# 练习把列表中的字符串变为小写，形成一个新的列表
li5 = ["LiFeibiao", "KKKK", "Fraid", "nice"]
li6 = [str.lower() for str in li5]
print(li6)


# 使用生成器实现杨辉三角
def func(n):
    arr = [1]
    index = 0
    while index < n:
        yield arr
        arr = [arr[x] + arr[x + 1] for x in range(len(arr) - 1)]
        arr.insert(0,1)
        arr.append(1)
        index += 1

g = func(10)
for i in g:
    print(i)



#